package com.zdj.websocket.controller.v2;

import com.zdj.websocket.model.InMessage;
import com.zdj.websocket.service.WebSocketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;

/**
 * @author zhangdj
 */
@Controller
public class V2GameInfoController {

    @Autowired
    private WebSocketService webSocketService;

    @MessageMapping("/v2/chat")
    public void gameInfo(InMessage inMessage) {
        webSocketService.send("/topic/game_rank", inMessage.getContent());
    }
}
